package com.eastfair.venueservice.entity;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.eastfair.core.base.entity.Entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import com.eastfair.database.mybatis.typehandler.M9EncryptHandler;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDateTime;
import java.util.HashMap;
import java.util.Map;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;
import static com.eastfair.core.utils.DateUtils.DEFAULT_DATE_TIME_FORMAT;
import com.eastfair.annotation.model.EchoVO;
import com.eastfair.venueservice.enumeration.ArrangementManageArrangementSourceEnum;
import com.eastfair.venueservice.enumeration.ArrangementManagePunishStatusEnum;

import static com.baomidou.mybatisplus.annotation.SqlCondition.LIKE;

/**
 * <p>
 * 实体类
 * 布撤展现场管理
 * </p>
 *
 * @author dqq
 * @since 2023-05-17
 */
@Data
@NoArgsConstructor
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName(value="vsm_arrangement_manage",autoResultMap = true)
@ApiModel(value = "ArrangementManage", description = "布撤展现场管理")
@AllArgsConstructor
public class ArrangementManage extends Entity<Long> implements EchoVO {

    private static final long serialVersionUID = 1L;
    @TableField(exist = false)
    private Map<String, Object> echoMap = new HashMap<>();
    /**
     * 是否启用（确认状态）：1是 已确认；0否 未确认
     */
    @ApiModelProperty(value = "是否启用（确认状态）：1是 已确认；0否 未确认")
    @TableField(value = "is_enabled")
    @Excel(name = "是否启用（确认状态）：1是 已确认；0否 未确认")
    private Integer isEnabled;

    /**
     * 是否删除：1是；0否
     */
    @ApiModelProperty(value = "是否删除：1是；0否")
    @TableField(value = "is_deleted")
    @Excel(name = "是否删除：1是；0否")
    private Integer isDeleted;

    /**
     * 项目id
     */
    @ApiModelProperty(value = "项目id")
    @TableField(value = "project_id")
    @Excel(name = "项目id")
    private Long projectId;

    /**
     * 子系统id
     */
    @ApiModelProperty(value = "子系统id")
    @TableField(value = "subsystem_id")
    @Excel(name = "子系统id")
    private Long subsystemId;

    /**
     * 租户id
     */
    @ApiModelProperty(value = "租户id")
    @TableField(value = "tenant_id")
    @Excel(name = "租户id")
    private Long tenantId;

    /**
     * 展会id
     */
    @ApiModelProperty(value = "展会id")
    @TableField(value = "exhibition_manage_id")
    @Excel(name = "展会id")
    private Long exhibitionManageId;

    /**
     * 展馆编码
     */
    @ApiModelProperty(value = "展馆编码")
    @Size(max = 100, message = "展馆编码长度不能超过100")
    @TableField(value = "space_code", condition = LIKE)
    @Excel(name = "展馆编码")
    private String spaceCode;

    /**
     * 展馆号
     */
    @ApiModelProperty(value = "展馆号")
    @Size(max = 100, message = "展馆号长度不能超过100")
    @TableField(value = "space_name", condition = LIKE)
    @Excel(name = "展馆号")
    private String spaceName;

    /**
     * 展位编码
     */
    @ApiModelProperty(value = "展位编码")
    @Size(max = 100, message = "展位编码长度不能超过100")
    @TableField(value = "site_code", condition = LIKE)
    @Excel(name = "展位编码")
    private String siteCode;

    /**
     * 展位号
     */
    @ApiModelProperty(value = "展位号")
    @Size(max = 100, message = "展位号长度不能超过100")
    @TableField(value = "site_name", condition = LIKE)
    @Excel(name = "展位号")
    private String siteName;

    /**
     * 展位类型
     */
    @ApiModelProperty(value = "展位类型")
    @Size(max = 64, message = "展位类型长度不能超过64")
    @TableField(value = "site_type", condition = LIKE)
    @Excel(name = "展位类型")
    private String siteType;

    /**
     * 展位面积
     */
    @ApiModelProperty(value = "展位面积")
    @TableField(value = "site_area")
    @Excel(name = "展位面积")
    private BigDecimal siteArea;

    /**
     * 展商ID
     */
    @ApiModelProperty(value = "展商ID")
    @TableField(value = "exhibitor_id")
    @Excel(name = "展商ID")
    private Long exhibitorId;

    /**
     * 展商名称
     */
    @ApiModelProperty(value = "展商名称")
    @Size(max = 100, message = "展商名称长度不能超过100")
    @TableField(value = "exhibitor_name", condition = LIKE)
    @Excel(name = "展商名称")
    private String exhibitorName;

    /**
     * 搭建商施工负责人
     */
    @ApiModelProperty(value = "搭建商施工负责人")
    @Size(max = 200, message = "搭建商施工负责人长度不能超过200")
    @TableField(value = "construction_principal", condition = LIKE)
    @Excel(name = "搭建商施工负责人")
    private String constructionPrincipal;

    /**
     * 搭建商联系电话
     */
    @ApiModelProperty(value = "搭建商联系电话")
    @Size(max = 50, message = "搭建商联系电话长度不能超过50")
    @TableField(value = "principal_phone", condition = LIKE,typeHandler = M9EncryptHandler.class)
    @Excel(name = "搭建商联系电话")
    private String principalPhone;

    /**
     * 被监督者id
     */
    @ApiModelProperty(value = "被监督者id")
    @TableField(value = "supervised_id")
    @Excel(name = "被监督者id")
    private Long supervisedId;

    /**
     * 被监督者名称(主运,主场，搭建商)
     */
    @ApiModelProperty(value = "被监督者名称(主运,主场，搭建商)")
    @Size(max = 100, message = "被监督者名称(主运,主场，搭建商)长度不能超过100")
    @TableField(value = "supervised_name", condition = LIKE)
    @Excel(name = "被监督者名称(主运,主场，搭建商)")
    private String supervisedName;

    /**
     * 被监督者类型(主场，主运，搭建商 )
     */
    @ApiModelProperty(value = "被监督者类型(主场，主运，搭建商 )")
    @Size(max = 255, message = "被监督者类型(主场，主运，搭建商 )长度不能超过255")
    @TableField(value = "supervised_type", condition = LIKE)
    @Excel(name = "被监督者类型(主场，主运，搭建商 )")
    private String supervisedType;

    /**
     * 监督者id(主场，场馆)
     */
    @ApiModelProperty(value = "监督者id(主场，场馆)")
    @TableField(value = "supervisor_id")
    @Excel(name = "监督者id(主场，场馆)")
    private Long supervisorId;

    /**
     * 监督企业名称
     */
    @ApiModelProperty(value = "监督企业名称")
    @Size(max = 200, message = "监督企业名称长度不能超过200")
    @TableField(value = "supervisor_name", condition = LIKE)
    @Excel(name = "监督企业名称")
    private String supervisorName;

    /**
     * 监督者类型(主场，场馆)
     */
    @ApiModelProperty(value = "监督者类型(主场，场馆)")
    @Size(max = 255, message = "监督者类型(主场，场馆)长度不能超过255")
    @TableField(value = "supervisor_type", condition = LIKE)
    @Excel(name = "监督者类型(主场，场馆)")
    private String supervisorType;

    /**
     * 巡馆负责人ID
     */
    @ApiModelProperty(value = "巡馆负责人ID")
    @TableField(value = "supervisor_user_id")
    @Excel(name = "巡馆负责人ID")
    private Long supervisorUserId;

    /**
     * 巡馆负责人姓名
     */
    @ApiModelProperty(value = "巡馆负责人姓名")
    @Size(max = 100, message = "巡馆负责人姓名长度不能超过100")
    @TableField(value = "supervisor_user_name", condition = LIKE)
    @Excel(name = "巡馆负责人姓名")
    private String supervisorUserName;

    /**
     * 处罚状态 #{NOT_PUNISH:未处罚;HAS_PUNISH:已处罚}
     */
    @ApiModelProperty(value = "处罚状态 #{NOT_PUNISH:未处罚;HAS_PUNISH:已处罚}")
    @TableField(value = "punish_status")
    @Excel(name = "处罚状态 #{NOT_PUNISH:未处罚;HAS_PUNISH:已处罚}", replace = {"未处罚_NOT_PUNISH", "已处罚_HAS_PUNISH",  "_null"})
    private ArrangementManagePunishStatusEnum punishStatus;

    /**
     * 布撤展管理记录来源 #{HOME_CHECK:主场巡检;VENUE_CHECK:场馆巡检}
     */
    @ApiModelProperty(value = "布撤展管理记录来源 #{HOME_CHECK:主场巡检;VENUE_CHECK:场馆巡检}")
    @TableField(value = "arrangement_source")
    @Excel(name = "布撤展管理记录来源 #{HOME_CHECK:主场巡检;VENUE_CHECK:场馆巡检}", replace = {"主场巡检_HOME_CHECK", "场馆巡检_VENUE_CHECK",  "_null"})
    private ArrangementManageArrangementSourceEnum arrangementSource;

    /**
     * 违规项目ID
     */
    @ApiModelProperty(value = "违规项目ID")
    @TableField(value = "violation_project_id")
    @Excel(name = "违规项目ID")
    private Long violationProjectId;

    /**
     * 违规项目
     */
    @ApiModelProperty(value = "违规项目")
    @Size(max = 255, message = "违规项目长度不能超过255")
    @TableField(value = "violation_project", condition = LIKE)
    @Excel(name = "违规项目")
    private String violationProject;

    /**
     * 扣除分值
     */
    @ApiModelProperty(value = "扣除分值")
    @TableField(value = "score")
    @Excel(name = "扣除分值")
    private Integer score;

    /**
     * 应处罚金额
     */
    @ApiModelProperty(value = "应处罚金额")
    @TableField(value = "should_punish_amount")
    @Excel(name = "应处罚金额")
    private BigDecimal shouldPunishAmount;

    /**
     * 备注
     */
    @ApiModelProperty(value = "备注")
    @Size(max = 1000, message = "备注长度不能超过1000")
    @TableField(value = "remark", condition = LIKE)
    @Excel(name = "备注")
    private String remark;


    @Builder
    public ArrangementManage(Long id, Long createdBy, LocalDateTime createTime, Long updatedBy, LocalDateTime updateTime, 
                    Integer isEnabled, Integer isDeleted, Long projectId, Long subsystemId, Long tenantId, 
                    Long exhibitionManageId, String spaceCode, String spaceName, String siteCode, String siteName, String siteType, 
                    BigDecimal siteArea, Long exhibitorId, String exhibitorName, String constructionPrincipal, String principalPhone, Long supervisedId, 
                    String supervisedName, String supervisedType, Long supervisorId, String supervisorName, String supervisorType, Long supervisorUserId, 
                    String supervisorUserName, ArrangementManagePunishStatusEnum punishStatus, ArrangementManageArrangementSourceEnum arrangementSource, Long violationProjectId, String violationProject, Integer score, 
                    BigDecimal shouldPunishAmount, String remark) {
        this.id = id;
        this.createdBy = createdBy;
        this.createTime = createTime;
        this.updatedBy = updatedBy;
        this.updateTime = updateTime;
        this.isEnabled = isEnabled;
        this.isDeleted = isDeleted;
        this.projectId = projectId;
        this.subsystemId = subsystemId;
        this.tenantId = tenantId;
        this.exhibitionManageId = exhibitionManageId;
        this.spaceCode = spaceCode;
        this.spaceName = spaceName;
        this.siteCode = siteCode;
        this.siteName = siteName;
        this.siteType = siteType;
        this.siteArea = siteArea;
        this.exhibitorId = exhibitorId;
        this.exhibitorName = exhibitorName;
        this.constructionPrincipal = constructionPrincipal;
        this.principalPhone = principalPhone;
        this.supervisedId = supervisedId;
        this.supervisedName = supervisedName;
        this.supervisedType = supervisedType;
        this.supervisorId = supervisorId;
        this.supervisorName = supervisorName;
        this.supervisorType = supervisorType;
        this.supervisorUserId = supervisorUserId;
        this.supervisorUserName = supervisorUserName;
        this.punishStatus = punishStatus;
        this.arrangementSource = arrangementSource;
        this.violationProjectId = violationProjectId;
        this.violationProject = violationProject;
        this.score = score;
        this.shouldPunishAmount = shouldPunishAmount;
        this.remark = remark;
    }

}
